<pre>
<?php
echo "SESSION\n";
print_r ($_SESSION);
echo "COOKIE\n";
print_r ($_COOKIE);
echo "GET\n";
print_r ($_GET);
echo "POST\n";
print_r ($_POST);
if ($_POST['token']) {
    $cont = file_get_contents("http://loginza.ru/api/authinfo?token=" . $_POST['token']);
    echo "$cont\n";
    $decoded = json_decode($cont, true);
    print_r ($decoded);
    if ($decoded['identity']) {
        echo "identity = " . $decoded['identity'] . " hash = " . sha1($decoded['identity']) . "\n";
    }
}
?>
</pre>
